﻿<%@ Page Title="Đơn hàng" Language="C#" MasterPageFile="~/Master/Normal/Normal.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HCFramework.Product.ShoppingCart.Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="groupHeader">
        <%=M.Common.GetLang("Thông tin đơn hàng") %>
    </div>
    <asp:Panel ID="PanelGrid" runat="server">
        <telerik:radgrid id="RadGridMain" runat="server" skin="Office2007" autogeneratecolumns="False"
            onitemcommand="RadGridMain_ItemCommand" onprerender="RadGridMain_PreRender"
            allowpaging="True" allowsorting="True" gridlines="None" allowmultirowselection="True"
            ShowFooter="true" onitemdatabound="RadGridMain_ItemDataBound">
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <MasterTableView CommandItemSettings-AddNewRecordText="Thêm mới"
            NoMasterRecordsText="Hiện chưa có sản phẩm nào trong giỏ hàng.">
            <RowIndicatorColumn>
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <CommandItemSettings AddNewRecordText="Thêm mới" />
            <Columns>
                <telerik:GridClientSelectColumn UniqueName="column" FooterStyle-BackColor="White">
                </telerik:GridClientSelectColumn>
                <telerik:GridBoundColumn DataField="ProductId" UniqueName="ProductId" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn HeaderText="Mã sản phẩm" UniqueName="ProductCode" FooterStyle-BackColor="White">
                    <ItemTemplate>
                        <asp:Literal Text='<%#Eval("ProductCode")%>' ID="litProductCode" runat="server"></asp:Literal>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Tên sản phẩm" UniqueName="ProductName" FooterStyle-BackColor="White">
                    <ItemTemplate>
                        <asp:HyperLink ID="linkProductDetail" runat="server" Text='<%#Eval("ProductName")%>' Target="_blank"></asp:HyperLink>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Số lượng" UniqueName="Count" FooterStyle-BackColor="White">
                    <ItemTemplate>
                        <asp:TextBox ID="txtCount" OnTextChanged="LinkButtonUpdate_Click" AutoCompleteType="None" Width="20px" runat="server" Text='<%#Eval("Count")%>'></asp:TextBox>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Đơn giá" UniqueName="Price" ItemStyle-HorizontalAlign="Right" FooterStyle-BackColor="White">
                    <ItemTemplate>
                        <b>
                            <asp:Literal Text='<%#Eval("Price")%>' ID="litPrice" runat="server"></asp:Literal> VNĐ
                        </b>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Thành tiền" UniqueName="TotalPrice" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" FooterStyle-BackColor="White">
                    <ItemTemplate>
                        <b>
                            <asp:Literal ID="litTotalPrice" runat="server"></asp:Literal> VNĐ
                        </b>
                    </ItemTemplate>
                    <FooterTemplate>
                        <%=M.Common.GetLang("Tổng") %>:
                        <b>
                            <asp:Literal ID="litTotalPrice" runat="server"></asp:Literal> VNĐ
                        </b>
                    </FooterTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:radgrid>
        <div style="padding-top: 10px">
            <asp:LinkButton ID="LinkButtonUpdate"
                runat="server" CssClass="linkButton" onclick="LinkButtonUpdate_Click"><%=M.Common.GetLang("Cập nhật") %></asp:LinkButton>
            <asp:LinkButton ID="LinkButtonDelete" OnClientClick="return confirm('Are you sure?');"
                runat="server" CssClass="linkButton" onclick="LinkButtonDelete_Click"><%=M.Common.GetLang("Xóa") %></asp:LinkButton>
            <asp:LinkButton ID="LinkButtonContinueShopping"
                runat="server" CssClass="linkButton" PostBackUrl="~/Product/Default.aspx"><%=M.Common.GetLang("Tiếp tục mua hàng") %></asp:LinkButton>
            <asp:LinkButton ID="LinkButtonGoToPayment"
                runat="server" CssClass="linkButton" onclick="LinkButtonGoToPayment_Click"><%=M.Common.GetLang("Thanh toán") %></asp:LinkButton>
        </div>
    </asp:Panel>
</asp:Content>
<asp:Content ID="ContentLeft" ContentPlaceHolderID="ContentPlaceHolderLeft" runat="server">
</asp:Content>
<asp:Content ID="ContentRight" ContentPlaceHolderID="ContentPlaceHolderRight" runat="server">
</asp:Content>